package com.example.cloud;

import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: create by xiong
 * @date: 2021/5/21
 * @description:
 */
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@RestController
public class PaymentApplication {
    public static void main(String[] args) {
        SpringApplication.run(PaymentApplication.class, args);
    }
    @Value("${test}")
    private String ds;
    @Value("${server.port}")
    private String port;
    @GetMapping("test")
    public String test(HttpServletRequest request){
        String authorization = request.getHeader("Authorization");
        return authorization+"-----"+ds+"端口："+port;
    }
}
